package com.module03.Q4_StudentManager;

//学生类
//重写构造方法
//重写toString方法
public class Q4_Student {
    private  int id;
    private String name;
    private int age;



    public Q4_Student(int id, String name, int age) {
        this.id = id;
        this.name = name;
        this.age = age;
    }

    public Q4_Student(int id) {
        this.id = id;
    }


    public int getId() {
        return id;
    }

    @Override
    public String toString() {
        return "学号："+id+" 姓名："+name+" 年龄："+ age;
    }
}
